Object[].FindByRefSorted (gb)
Function FindByRefSorted ( Value As Object [ , Start As Integer ] ) As Integer
Dal 3.16
Return the position of the first occurrence of a specific object in the array.
If
Start is specified, then the search begins at the
Start position. By default the entire array is searched.
If
Value cannot be found, a negative value is returned. It equals
-1 - pos
, where
pos
is the position
Value should be inserted at to keep the array sorted.returned.
Contrary to
Find, this function always compare objects by identity
(i.e. by using their memory address). The
_compare special method is not used.
This method only works if the array is sorted.
But it is faster than the
Find method as it uses a binary search algorithm.